<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;


// ++++++++++++++++++++ 后台 ++++++++++++++++++++ //
Route::rule('MiniProgram','admin/MiniProgram/index');
Route::rule('MiniProgram/AuthCode','admin/MiniProgram/AuthCode');
Route::rule('wx/ticket','admin/wx/ticket');
Route::rule('wx/authcodecallback','admin/Wx/AuthcodeCallback');
Route::rule('wx/index/:appId','admin/Wx/index');



// ++++++++++++++++++++ API 接口 ++++++++++++++++++++ //
// ++++++++++++ 首页 Begin ++++++++++++ //
// 首页数据
Route::rule('wx/getHomeFrame','api/HomeFrame/getHomeFrame');

// ++++++ 全部村子 ++++++ //
Route::rule('wx/villages/getVillagesList','api/Villages/getVillagesList');
// 村子详情
Route::rule('wx/villages/getVillagesDetail','api/Villages/getVillagesDetail');
// 村民
Route::rule('wx/member/getMemberList','api/Member/getMemberList'); // 列表
Route::rule('wx/member/getMemberDetail','api/Member/getMemberDetail'); // 详情
// 领导干部
Route::rule('wx/member/getCadreList','api/Member/getCadreList'); // 列表


// ++++++ 机构部门 ++++++ //
Route::rule('wx/getInstitutionList','api/Institution/getInstitutionList'); // 列表
Route::rule('wx/getInstitutionDetail','api/Institution/getInstitutionDetail'); // 详情
Route::rule('wx/getAllDepartments','api/Institution/getAllDepartments'); // 机构及下级部门列表


// ++++++ 农事服务 ++++++ //
Route::rule('wx/getKnowledgeHomeFrame','api/Knowledge/getKnowledgeHomeFrame'); // 首页
Route::rule('wx/knowledgetype','api/Knowledge/getType'); // 专题列表
Route::rule('wx/knowledgeList','api/Knowledge/getList'); // 农事知识列表
Route::rule('wx/knowledgeDetail','api/Knowledge/getDetail'); // 农事知识详情


// ++++++ 专题 ++++++ //
//Route::rule('wx/getSpecialtopicType','api/Specialtopic/getSpecialtopicType'); // 专题分类
//Route::rule('wx/getSpecialtopiccontentList','api/Specialtopic/getSpecialtopiccontentList'); // 专题内容列表
//Route::rule('wx/getSpecialtopiccontentDetail','api/Specialtopic/getSpecialtopiccontentDetail'); // 专题内容详情


// ++++++ 本地特色 ++++++ //
Route::rule('wx/getFeaturecolumn','api/Features/getFeaturecolumn'); // 本地特色列表
Route::rule('wx/getFeaturesList','api/Features/getFeaturesList'); // 特色内容列表
Route::rule('wx/getFeaturesDetail','api/Features/getFeaturesDetail'); // 特色内容详情


// ++++++ 智慧党建 ++++++ //
// 智慧党建首页
Route::rule('wx/getPartyHomeFrame','api/PartyHomeFrame/getPartyHomeFrame');
Route::rule('wx/organizationList','api/Organization/getList');  // 组织列表
Route::rule('wx/partyList','api/Organization/partyList');  // 组织下的成员列表
Route::rule('wx/partyDetail','api/Member/getPartyDetail');  // 组织下的成员详情

// 微课堂
Route::rule('wx/microclassroom/getMicroclassroomType','api/Microclassroom/getMicroclassroomType'); // 分类
Route::rule('wx/microclassroom/getMicroclassroomList','api/Microclassroom/getMicroclassroomList'); // 列表
Route::rule('wx/microclassroom/getMicroclassroomDetail','api/Microclassroom/getMicroclassroomDetail'); // 详情
Route::rule('wx/microclassroom/viewClasshourFile','api/Microclassroom/viewClasshourFile'); // 课程文件浏览
Route::rule('wx/microclassroom/joinClassroom','api/Microclassroom/joinClassroom'); // 加入学习计划
// 在线考试
Route::rule('wx/onlineexam/getOnlineexamList','api/Onlineexam/getOnlineexamList'); // 列表
Route::rule('wx/onlineexam/getOnlineexamDetail','api/Onlineexam/getOnlineexamDetail'); // 详情
Route::rule('wx/onlineexam/getExamquestion','api/Onlineexam/getExamquestion'); // 获取考题
Route::rule('wx/onlineexam/placeExamquestion','api/Onlineexam/placeExamquestion'); // 提交考题答案
Route::rule('wx/onlineexam/getExamresults','api/Onlineexam/getExamresults'); // 考试结果
Route::rule('wx/onlineexam/viewExamresults','api/Onlineexam/viewExamresults'); // 查看答案
// 会议
Route::rule('wx/meeting/getMeetingList','api/Meeting/getMeetingList'); // 列表
Route::rule('wx/meeting/getMeetingDetail','api/Meeting/getMeetingDetail'); // 详情
// 调研
Route::rule('wx/research/getResearchList','api/Research/getResearchList'); // 列表
Route::rule('wx/research/getResearchDetail','api/Research/getResearchDetail'); // 详情
Route::rule('wx/research/placeResearch','api/Research/placeResearch'); // 提交调研
// 活动
Route::rule('wx/activity/getActivityList','api/Activity/getActivityList'); // 列表
Route::rule('wx/activity/getActivityDetail','api/Activity/getActivityDetail'); // 详情
Route::rule('wx/activity/placeActivity','api/Activity/placeActivity'); // 提交报名
// ++++++ 精准扶贫 ++++++ //
// 精准扶贫首页
Route::rule('wx/getPoveryHomeFrame','api/PoveryHomeFrame/getPoveryHomeFrame');
// 贫困户
Route::rule('wx/povertymembers','api/Member/getPovertyMembers');  // 列表
// 扶贫项目
Route::rule('wx/povertyproject','api/Poverty/povertyproject');  //扶贫项目列表
Route::rule('wx/povertyprojectType','api/Poverty/povertyprojectType');  //扶贫项目分类列表
Route::rule('wx/povertyprojectDetail','api/Poverty/povertyprojectDetail');  //扶贫项目详情
// 扶贫工作
Route::rule('wx/povertywork','api/Poverty/povertywork');  // 帮扶工作列表
Route::rule('wx/povertyworkDetail','api/Poverty/povertyworkDetail'); // 帮扶工作详情
// ++++++ 便民服务 ++++++ //
Route::rule('wx/getWorkList','api/article/getWorkList');
// ++++++++++++ 首页 End ++++++++++++ //


// ++++++++++++ 一村一品 Begin ++++++++++++ //
// 首页数据
Route::rule('wx/getProductHomeFrame','api/ProductHomeFrame/getProductHomeFrame');
// 搜索
Route::rule('wx/searchProduct','api/ProductHomeFrame/searchProduct');
// ++++++ 产地直供 ++++++ //
Route::rule('wx/product/getTownProducts','api/Product/getTownProducts'); // 镇农产品
// 产地农产品
Route::rule('wx/product/getVillageProducts','api/Product/getVillageProducts'); // 村农产品
// ++++++ 全部分类 ++++++ //
Route::rule('wx/product/getProductList','api/Product/getProductList'); // 分类产品
Route::rule('wx/product/getProductType','api/Product/getProductType'); // 产品分类
Route::rule('wx/product/getProductPlace','api/Product/getProductPlace'); // 产品产地
Route::rule('wx/product/getVillages','api/Product/getVillages'); // 获取村
Route::rule('wx/product/getRecommend','api/Product/getRecommend'); // 产品推荐
Route::rule('wx/product/searchProduct','api/Product/searchProduct'); // 搜索
// 农产品详情
Route::rule('wx/product/getProductDetail','api/Product/getProductDetail');
// ++++++ 预售 ++++++ //
Route::rule('wx/product/getPresaleProductList','api/Product/getPresaleProductList');
// 预售详情
Route::rule('wx/product/getPresaleProductDetail','api/Product/getPresaleProductDetail');
// ++++++++++++ 一村一品 End ++++++++++++ //


// ++++++++++++ 社区 Begin ++++++++++++ //
// 首页数据
Route::rule('wx/getDynamicHomeFrame','api/Dynamic/getDynamicHomeFrame');
// 信息（动态）分类列表
Route::rule('wx/dynamic/getDynamicTypeList','api/Dynamic/getDynamicTypeList');
// 信息（动态）列表
Route::rule('wx/dynamic/getDynamicList','api/Dynamic/getDynamicList');
// 发布动态
Route::rule('wx/dynamic/postDynamic','api/Dynamic/postDynamic');
// 动态详情
Route::rule('wx/dynamic/getDynamicDetail','api/Dynamic/getDynamicDetail');
// 个人动态
Route::rule('wx/dynamic/getUserDynamics','api/Dynamic/getUserDynamics');
Route::rule('wx/dynamic/delDynamic','api/Dynamic/delDynamic'); // 删除动态
// ++++++++++++ 社区 End ++++++++++++ //


// ++++++++++++ 我的 Begin ++++++++++++ //
// 个人主页
Route::rule('wx/getUserDetail','api/User/getUserDetail');
Route::rule('wx/getMyProductcard','api/Userproductcard/getList'); // 我的名片
Route::rule('wx/getMyFarm','api/Userfarm/getList'); // 我的农场
Route::rule('wx/getMyPovertypolicy','api/User/myPovertypolicy'); // 我的享受政策
Route::rule('wx/getMyPovertypolicyDetail','api/User/myPovertypolicyDetail'); // 我的享受政策详情
Route::rule('wx/getMyPovertyproject','api/User/myPoverty'); // 我的扶贫项目
// 登录
Route::rule('wx/..','api/..');
// 身份认证
Route::rule('wx/userauth/getHomeFrame','api/UserAuth/getHomeFrame'); // 首页
//Route::rule('wx/userinfo/getMyDetails','api/Member/getMyDetails'); // 我是村民详情
Route::rule('wx/userauth/saveBaseinfo','api/UserAuth/saveBaseinfo'); // 保存基本信息
//Route::rule('wx/userauth/partyInfo','api/UserAuth/partyInfo'); // 党员详情
Route::rule('wx/userauth/authParty','api/UserAuth/authParty'); // 党员认证
Route::rule('wx/userauth/authInstitution','api/UserAuth/authInstitution'); // 公职人员认证
Route::rule('wx/userauth/authVillager','api/UserAuth/authVillager'); // 村居民认证
Route::rule('wx/userauth/authPoverty','api/UserAuth/authPoverty'); // 贫困户认证
Route::rule('wx/userauth/delResume','api/UserAuth/delResume'); // 删除工作履历
// 协同办公
Route::rule('wx/project/getHome','api/Userproject/getHome'); // 首页
Route::rule('wx/project/createProject','api/Userproject/createProject'); // 创建工程项目
Route::rule('wx/project/handleProject','api/Userproject/handleProject'); // 操作工程项目
Route::rule('wx/projecttask/getTasks','api/Userprojecttask/getTasks'); // 项目任务
Route::rule('wx/projecttask/getTaskDetail','api/Userprojecttask/getTaskDetail'); // 任务详情
Route::rule('wx/projecttask/saveTask','api/Userprojecttask/saveTask'); // 保存任务
Route::rule('wx/projecttask/delTask','api/Userprojecttask/delTask'); // 删除任务
Route::rule('wx/projecttaskreport/getReports','api/Userprojecttaskreport/getReports'); // 任务汇报列表
Route::rule('wx/projecttaskreport/saveReport','api/Userprojecttaskreport/saveReport'); // 保存任务汇报
Route::rule('wx/projecttaskreport/delReport','api/Userprojecttaskreport/delReport'); // 删除任务汇报
Route::rule('wx/projectfile/getFiles','api/Userprojectfile/getFiles'); // 项目文件
Route::rule('wx/projectfile/uploadFile','api/Userprojectfile/uploadFile'); // 上传项目文件
//Route::rule('wx/projectfile/downloadFile','api/Userprojectfile/downloadFile'); // 下载项目文件
//Route::rule('wx/projectfile/saveToFloder','api/Userprojectfile/saveToFloder'); // 项目文件保存到我的文件夹
Route::rule('wx/projectfile/rename','api/Userprojectfile/rename'); // 重命名项目文件
Route::rule('wx/projectfile/delFile','api/Userprojectfile/delFile'); // 删除项目文件
Route::rule('wx/projectchat/getMess','api/Userprojectchat/getMess'); // 项目交流 - 列表
Route::rule('wx/projectchat/createMess','api/Userprojectchat/createMess'); // 项目交流 - 发送消息
Route::rule('wx/project/getMembers','api/Userproject/getMembers'); // 项目成员
// 共享云盘
Route::rule('wx/library/getHome','api/Library/getHome'); // 首页
Route::rule('wx/library/saveFolder','api/Library/saveFolder'); // 创建/保存文件夹
Route::rule('wx/library/delFolder','api/Library/delFolder'); // 删除文件夹
Route::rule('wx/library/fileTypeList','api/Library/getFileTypeList'); // 文件分类
Route::rule('wx/library/getFileList','api/Library/getFileList'); // 共享文库 文件列表
Route::rule('wx/library/getMyFiles','api/Library/getMyFiles'); // 我的文件夹 文件列表
Route::rule('wx/library/moveMyFile','api/Library/moveMyFile'); // 我的文件夹 文件转移
//Route::rule('wx/library/renameMyFile','api/Library/renameMyFile'); // 我的文件夹 文件重命名
Route::rule('wx/library/delMyFile','api/Library/delMyFile'); // 我的文件夹 删除文件
Route::rule('wx/library/uploadFile','api/Library/uploadFile'); // 上传文件
//Route::rule('wx/library/downloadFile','api/Library/downloadFile'); // 文件下载
//Route::rule('wx/library/saveToFloder','api/Library/saveToFloder'); // 项目文件保存到我的文件夹
Route::rule('wx/file/saveToFloder','api/Common/saveToFloder'); // 文件保存到我的文件夹
// ++++++ 党员中心 ++++++ //
// （通讯录）我的组织
Route::rule('wx/userinfo/getMyOrganizations','api/UserParty/getMyOrganizations');
// 学习计划
Route::rule('wx/userinfo/getMyClassrooms','api/UserParty/getMyClassrooms'); // 列表
Route::rule('wx/userinfo/getMyClassroomDetail','api/UserParty/getMyClassroomDetail'); // 详情
Route::rule('wx/userinfo/cancelClassroom','api/UserParty/cancelClassroom'); // 取消学习
// 我的考试
Route::rule('wx/userinfo/getMyOnlineexams','api/UserParty/getMyOnlineexams');
// 我的会议
Route::rule('wx/userinfo/getMyMeetings','api/UserParty/getMyMeetings'); // 列表
Route::rule('wx/userinfo/meetingSignIn','api/UserParty/meetingSignIn'); // 扫码签到
Route::rule('wx/userinfo/getMembers','api/Meeting/getMembers'); // 获取成员
Route::rule('wx/userinfo/meetingDetail','api/Meeting/detail'); // 详情
Route::rule('wx/userinfo/meetingSave','api/Meeting/save'); // 保存
Route::rule('wx/userinfo/meetingHandle','api/Meeting/handle'); // 操作
// 参与调研
Route::rule('wx/userinfo/getMyResearchs','api/UserParty/getMyResearchs');
// 我报名的活动
Route::rule('wx/userinfo/getMyActivitys','api/UserParty/getMyActivitys');
Route::rule('wx/userinfo/cancelActivity','api/UserParty/cancelActivity'); // 取消活动报名
// 农场
Route::rule('wx/farm/getList','api/Userfarm/getList'); // 列表
Route::rule('wx/farm/getDetail','api/Userfarm/getDetail'); // 农场详情
Route::rule('wx/farm/save','api/Userfarm/save'); // 保存农场
Route::rule('wx/farm/delete','api/Userfarm/delete'); // 删除
// 农事记录
Route::rule('wx/farmrecord/getList','api/Userfarmrecord/getList'); // 列表
Route::rule('wx/farmrecord/save','api/Userfarmrecord/save'); // 保存农事记录
Route::rule('wx/farmrecord/delete','api/Userfarmrecord/delete'); // 删除
// 农事记账
Route::rule('wx/farmaccount/getHome','api/Userfarmaccount/getHome'); // 首页
Route::rule('wx/farmaccount/save','api/Userfarmaccount/save'); // 保存记账
Route::rule('wx/farmaccount/getStatistics','api/Userfarmaccount/getStatistics'); // 统计
Route::rule('wx/farmaccount/getDetail','api/Userfarmaccount/getDetail'); // 记账详情
Route::rule('wx/farmaccount/delete','api/Userfarmaccount/delete'); // 删除记账
// 农产品名片
Route::rule('wx/productcard/getList','api/Userproductcard/getList'); // 列表
Route::rule('wx/productcard/getDetail','api/Userproductcard/getDetail'); // 名片详情
Route::rule('wx/productcard/save','api/Userproductcard/save'); // 保存名片
Route::rule('wx/productcard/delete','api/Userproductcard/delete'); // 删除名片
// 农事提醒
Route::rule('wx/farmremind/getList','api/Userfarmremind/getList'); // 列表
Route::rule('wx/farmremind/getDetail','api/Userfarmremind/getDetail'); // 农事提醒详情
Route::rule('wx/farmremind/save','api/Userfarmremind/save'); // 保存农事提醒
Route::rule('wx/farmremind/delete','api/Userfarmremind/delete'); // 删除农事提醒
// 样品申领
Route::rule('wx/receiveorder/getList','api/Order/getReceiveorderList'); // 列表
Route::rule('wx/receiveorder/getDetail','api/Order/getDetail'); // 详情
// ++++++ 订单 ++++++ //
Route::rule('wx/..','api/..');
// 订单详情
Route::rule('wx/..','api/..');
// 申领样品
Route::rule('wx/order/placeSampleOrder','api/SampleOrder/placeSampleOrder');
// ++++++ 扶贫 ++++++ //
Route::rule('wx/userinfo/myPoverty','api/User/myPoverty');
// ++++++ 动态 ++++++ //
Route::rule('wx/userinfo/myDynamics','api/User/myDynamics'); // 列表
Route::rule('wx/userinfo/delDynamic','api/User/delDynamic'); // 删除
// ++++++ 关注 ++++++ //
Route::rule('wx/userinfo/myAttention','api/User/myAttention');
// ++++++ 收藏 ++++++ //
Route::rule('wx/userinfo/myCollect','api/User/myCollect');
// ++++++ 留言 ++++++ //
Route::rule('wx/userinfo/postMessage','api/User/postMessage');  //提交留言
// ++++++++++++ 我的 End ++++++++++++ //


// 订单相关
Route::post('createorder','api/Order/placeOrder');
Route::group('api/pay',[
    'pre_order' => ['api/Pay/getPreOrder',['method'=>'post']],
    'notify' => ['api/Pay/receiveNotify',['method'=>'post']],
    'offlineWechat' => ['api/Pay/offlineWecharPay',['method'=>'post']]
]);


// ++++++++++++ 通用 ++++++++++++ //
// 发送短信验证码
Route::rule('wx/sendSmsCode','api/Sms/sendSms');
// 轮播图
Route::rule('wx/handle/adbanner','api/Common/adbanner');
// 关注
Route::rule('wx/handle/attention','api/Common/attention');
// 取消关注
Route::rule('wx/handle/cancelAttention','api/Common/cancelAttention');
// 发布评论
Route::rule('wx/handle/postComment','api/Common/postComment');
// 收藏
Route::rule('wx/handle/collect','api/Common/collect');
// 取消收藏
Route::rule('wx/handle/cancelCollect','api/Common/cancelCollect');
// 点赞
Route::rule('wx/handle/like','api/Common/like');
// 获取评论列表
Route::rule('wx/handle/commentList','api/Common/commentList');
// 上传单张图片
Route::rule('wx/uploadOneImg','api/Common/uploadOneImg');
// 删除单张图片
Route::rule('wx/delOneImg','api/Common/delOneImg');
// 获取配置信息
Route::rule('wx/config/getConfig','api/Townconfig/getConfig');
// 获取名族
Route::rule('wx/getEthnic','api/Common/getEthnic');


Route::rule('wx/allDepartmentMembers','api/Institution/getAllDepartmentMembers'); // 部门及下面的人员列表
Route::rule('wx/allOrganizationMembers','api/Organization/getAllOrganizationMembers'); // 组织及下面的人员列表
Route::rule('wx/getPartyList','api/Member/getPartyList'); // 党员列表
Route::rule('wx/getHouseholderList','api/Member/getHouseholderList'); // 户主列表
Route::rule('wx/getCroptypes','api/Crop/getCroptypes'); // 获取农作物分类
Route::rule('wx/getCrops','api/Crop/getCrops'); // 获取农作物
Route::rule('wx/getVarieties','api/Crop/getVarieties'); // 获取品种
//Route::rule('wx/getAllVarieties','api/Varieties/getAllVarieties'); // 所有品种
Route::rule('wx/selectedFarm','api/Userfarm/selectedFarm'); // 选择农场
Route::rule('wx/getFertilizertypes','api/Fertilizer/getFertilizertypes'); // 获取肥料分类
Route::rule('wx/getFertilizers','api/Fertilizer/getFertilizers'); // 获取肥料
Route::rule('wx/addFertilizer','api/Fertilizer/addFertilizer'); // 添加肥料
//Route::rule('wx/getMedicaments','api/Medicament/getMedicaments'); // 获取药剂
Route::rule('wx/addMedicament','api/Fertilizer/addMedicament'); // 添加药剂
Route::rule('wx/getHarms','api/Harm/getHarms'); // 获取病害/虫害
Route::rule('wx/selectedHarm','api/Harm/selectedHarm'); // 选择病害/虫害
Route::rule('wx/getFarmaccounttypes','api/Userfarmaccount/getFarmaccounttypes'); // 获取农事记账类型

// ++++++++++++ 基础数据 ++++++++++++ //
//Route::rule('wx/getRelatedHouseholder','api/Data/getRelatedHouseholder'); // 与户主关系
//Route::rule('wx/getEducation','api/Data/getEducation'); // 文化程度
//Route::rule('wx/getHealth','api/Data/getHealth'); // 健康状况
//Route::rule('wx/getReligiousFaith','api/Data/getReligiousFaith'); // 宗教信仰
//Route::rule('wx/getLaborSkills','api/Data/getLaborSkills'); // 劳动技能
//Route::rule('wx/getWorkStatus','api/Data/getWorkStatus'); // 务工状况
//Route::rule('wx/getPovertydegree','api/Data/getPovertydegree'); // 贫困属性
//Route::rule('wx/getPovertyreason','api/Data/getPovertyreason'); // 致贫原因
//Route::rule('wx/getOutpoverty','api/Data/getOutpoverty'); // 脱贫属性


// ++++++++++++ 文章相关 ++++++++++++ //
Route::rule('wx/article/getArticle','api/Article/getArticle');
Route::rule('wx/article/getArticleType','api/Article/getArticleType');
Route::rule('wx/article/getArticleDetail','api/Article/getArticleDetail');


// ++++++++++++++++++++ 获取openID ++++++++++++++++++++ //
Route::rule('wx/token/user','api/Token/getToken');
Route::rule('wx/decodePhone','api/UserInfo/decodePhone');  //解析手机号
Route::rule('wx/getUserinfo','api/UserInfo/getUserInfo');
Route::rule('wx/saveUserInfo','api/UserInfo/saveUserInfo');

Route::rule('wx/wechat/userInfo','api/wechat/userInfo');  //保存用户信息
Route::rule('wx/wechat/getInfo','api/wechat/getInfo');  //获取用户信息

Route::rule('wx/weather/getWeather','api/Weather/getWeather');  //天气